// pages/myservice_doctor/myservice_doctor.js
var app = getApp();
Page({

  /**
   * 页面的初始数据
   */
  data: {
    logisticsData: [
      {
        title:'宣教知识',
        content: '蔡文姬医生给您推送了',
        name:'高血压预防知识',
        time: '01-11 00:00:00'
      },
      {
        title:'调查问卷',
        content: '蔡文姬医生给您推送了',
        name:'高血压每日问卷',
        time: '01-11 00:00:00'
      },
      {
        title:'图文问诊',
        content: '您问诊了蔡文姬医生',
        time: '01-11 00:00:00'
      },
      {
        title:'电话问诊',
        content: '您问诊了蔡文姬医生',
        time: '01-11 00:00:00'
      },
      {
        title:'随访计划',
        content: '蔡文姬医生给您推送了',
        name:'高血压随访计划',
        time: '01-11 00:00:00'
      },
      {
        title:'宣教知识',
        content: '蔡文姬医生给您推送了',
        name:'高血压预防知识',
        time: '01-11 00:00:00'
      }
    ]
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var that = this;
    var j_id = options.j_id;
    var zid = options.zid;
    that.setData({
      j_id:j_id,
      zid:zid
    })
    that.getDocinfo();
  },
  getDocinfo:function(){
    var that = this;
    app.util.request({
      'url':"entry/wxapp/follow.zhuanjia_detail",
      data:{
        openid:wx.getStorageSync('openid'),
        j_id:that.data.j_id,
        zid:that.data.zid
      },
      success:function(res)
      {
        that.setData({
          docinfo:res.data
        })
      }
    })
  },
  suifang:function(){
    var that = this;
    wx.navigateTo({
      url: '/hyb_yl/huanzhe/pages/private_services/private_services?zid='+that.data.zid,
    })
  },
  // 服务日志 链接跳转
  bindurl(e){
    var id = e.currentTarget.dataset.id;
    var type = e.currentTarget.dataset.type;
    if(type == '1')
    {
      wx.navigateTo({
        url: 'url',
      })
    }else if(type == '2')
    {
      wx.navigateTo({
        url: 'url?id='+id,
      })
    }
  },
})